<!-- 主体内容 -->
<div class="layui-fluid layadmin-cmdlist-fluid">
    <DIV class="layui-row layui-col-space30">
        @foreach($goodslist as $k=>$v)
            <div class="layui-col-md2 layui-col-sm4 layui-col-xs6" onclick="show('{{$v->goods_name}}','{{$v->id}}','{{$v->price}}')">
                <div class="cmdlist-container">
                    <a href="javascript:;">
                        <img src="{{ $v->goods_img ?? '../../layuiadmin/style/res/template/portrait.png' }}">
                        {{--<img src="../../layuiadmin/style/res/template/portrait.png">--}}
                    </a>
                    <a href="javascript:;">
                        <div class="cmdlist-text">
                            <p class="info">{{ $v->goods_name }}</p>
                            <div class="price">
                                <b>￥{{ $v->price }}</b>
                                <p>
                                    ¥
                                    <del>{{ $v->price * 1.5 }}</del>
                                </p>
                                <span class="flow">
                                  <i class="layui-icon layui-icon-rate" ></i>
                                  {{ $v->getOneGoodsBrowse()->sum('pagevies') }}
                                </span>
                            </div>
                        </div>
                    </a>
                </div>
            </div>
        @endforeach
    </DIV>
</div>
<div class="layui-col-md12 layui-col-sm12">
    <div id="demo0">

    </div>
</div>

<script>
    var show = function(name , id , price){

        console.log(name , id , price);

        layer.open({
            title: '商品名：' + name + ' 价格：' + price,
            type:2,
            shade: 0,
            maxmin:true,
            area:['95%','95%'],
            content:"{{ route('zbsuser.goods.show' , '') }}/" + id
        })
    }
</script>